<template>
  <el-dialog title="新建管理员" :visible.sync="dialogVisible">
    <el-form :model="form">
      <el-form-item label="账号:" label-width="100px">
        <el-input v-model="form.username" autocomplete="off" />
      </el-form-item>
      <el-form-item label="密码:" label-width="100px">
        <el-input v-model="form.password" autocomplete="off" />
      </el-form-item>
      <el-form-item label="备注:" label-width="100px">
        <el-input v-model="form.Introduction" autocomplete="off" />
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="dialogFormVisible = false">取 消</el-button>
      <el-button type="primary" @click="submit">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      dialogVisible: false,
      form: {
        username: '',
        password: '',
        roles: '',
        introduction: ''
      },
      formLabelWidth: '100px'
    }
  },
  methods: {
    submit() {
      this.$emit('addAdmin', this.form)
      this.dialogVisible = false
    }
  }
}
</script>

<style scoped>

</style>
